from tkinter import *
x=int(input('Введите начальную координату Х: '))
y=int(input('Введите начальную координату У: '))
n=int(input('Введите коэффициент умножения N: '))
cords=[0,0,0,20,10,20,10,30,20,30,20,10,10,10,10,0,0,0]
if n==0 and x>=0 and x<=500 and y>=0 and y<=500:
    pass
else:
    if n>0 and 0*n+x>=0 and 0*n+y>=0 and 20*n+x<=500 and 20*n+y<=500:
        pass
    else:
        if n<0 and 20*n+x>=0 and 20*n+y>=0 and 0*n+y<=500 and 0+n+y<=500:
            pass
        else:
            print('Размер фигуры превышает максимальный размер поля')
            exit()
root=Tk()
root.title("Ит-марафон")
root.geometry("500x500")
canvas=Canvas(bg="white", width=500, height=500)
canvas.pack(anchor=CENTER, expand=1)
canvas.create_polygon(cords[0] *n+x, cords[1] *n+y,
                      cords[2] *n+x, cords[3] *n+y,
                      cords[4] *n+x, cords[5] *n+y,
                      cords[6] *n+x, cords[7] *n+y,
                      cords[8] *n+x, cords[9] *n+y,
                      cords[10] *n+x, cords[11] *n+y,
                      cords[12] *n+x, cords[13] *n+y,
                      cords[14] *n+x, cords[15] *n+y,
                      cords[16] *n+x, cords[17] *n+y,)
root.mainloop()
